﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Gollie.Controls
{
	public partial class LoginHeader : BaseUserControl
	{
		protected override void OnFirstHit(object sender, EventArgs e)
		{
			if (!IsLoggedIn)
			{
				this.pnlNotLoggedIn.Visible = true;
				this.pnlLoggedIn.Visible = false;
			}
			else
			{
				this.pnlNotLoggedIn.Visible = false;
				this.pnlLoggedIn.Visible = true;
				this.lblUserInfo.Text = this.UserInfo.FullName;
				if (string.IsNullOrEmpty(this.UserInfo.Bedrijfsnaam))
					this.pnlVendorInfo.Visible = false;
				else
					this.lblVendor.Text = this.UserInfo.Bedrijfsnaam;
			}
		}

	}
}